package com.apache.gmall.mapper;

import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface UvMapper {

    /**
     * 根据渠道分组，获取当日的日活数据
     *
     * @param date 当天日期
     * @return List{
     *           Map[(ch -> Appstore),(uv -> 49),(uj -> 0).....],
     *           Map[(ch -> xiaomi),(uv -> 24),(uj -> 0) .....],
     *           ........
     *          }
     */
    @Select("select ch,sum(uv_ct) uv,sum(uj_ct) uj from dws_traffic_vc_ch_ar_is_new_page_view_window where toYYYYMMDD(stt)=#{date} group by ch")
    List<Map> selectUvByCh(int date);

}
